﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace TeacherService
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "TeacherSrv" in code, svc and config file together.
    public class TeacherSrv : ITeacherSrv
    {
        public List<Student_Progresses> getStudentProgress(int user_id, int game_id)
        {
            questEntities db = new questEntities();

            List<Student_Progresses> spList = new List<Student_Progresses>();

            var query = from s in db.Student_Progresses where s.fk_student_id == user_id && s.fk_schoolGame_id == game_id select s;
            spList = query.ToList<Student_Progresses>();
            //int a = listss.Last().pk_sp_id;
            return spList;
        }
    }
}
